package com.qlm.conn;

import java.sql.Connection;
import java.sql.DriverManager;

public class conn {

	public Connection getCon(){
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://124.232.153.69:3306/test";
			String user = "root";
			String password = "hnxinxiangwei123!@#";
			Connection conn = DriverManager.getConnection(url,user,password);
			System.out.println(conn.getMetaData().getURL());
			return conn;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
	}
}
